
PROJECT(geomagick_src)
FIND_PACKAGE(Boost)
IF(!Boost_FOUND)
  MESSAGE(FATAL_ERROR "Cannot build without Boost.")
ENDIF(!Boost_FOUND)

include_directories (${geomagick_SOURCE_DIR}/src ${Boost_INCLUDE_DIRS})
link_directories (${Boots_LIBRARY_DIRS})

# include the subdirectories
ADD_SUBDIRECTORY (BaseTypes)
#ADD_SUBDIRECTORY (Converters)
ADD_SUBDIRECTORY (gmDisplay)

#if you don't want the full compiler output, remove the following line
SET(CMAKE_VERBOSE_MAKEFILE ON)

#add definitions, compiler switches, etc.
ADD_DEFINITIONS(-g -Wall -O0)

#list all source files here
ADD_EXECUTABLE(../bin/factorytest factorytest.cpp)
ADD_EXECUTABLE(../bin/test main.cpp)
#ADD_EXECUTABLE(../bin/bf-test bf-test.cpp)
ADD_EXECUTABLE(../bin/conversionGraphTest conversionGraphTest.cpp)
ADD_LIBRARY(geomagick ConversionManager.cpp ConversionRoute.cpp Triangulizer.cpp NurbsTesselator.cpp Polygons2WingedEdges.cpp WingedEdges2Polygons.cpp)  
ADD_LIBRARY(readObj readObj.cpp)
#ADD_EXECUTABLE(../bin/readObj readObj.cpp)

#need to link to some other libraries ? just add them here
TARGET_LINK_LIBRARIES(geomagick ${Boost} )
TARGET_LINK_LIBRARIES(../bin/test ${Boost})
#TARGET_LINK_LIBRARIES(../bin/bf-test ${Boost})
TARGET_LINK_LIBRARIES(../bin/factorytest BaseTypes  ${Boost} geomagick readObj gmDisplay)
TARGET_LINK_LIBRARIES(../bin/conversionGraphTest ${Boost} geomagick)

#TARGET_LINK_LIBRARIES(../bin/readObj ${Boost} geomagick)
TARGET_LINK_LIBRARIES(readObj ${Boost} geomagick)

 
